package com.raylu.realtime.bean;

import lombok.Builder;
import lombok.Data;
import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

/**
 * Description:
 * <p>
 * Create by lucienoz on 2022/1/7.
 * Copyright © 2022 lucienoz. All rights reserved.
 */
@Data
@Builder
public class ProductStats {

    //window field
    String stt;
    String edt;
    //Dim field
    String sku_id;//sku_id
    //sku info
    String sku_name;//sku名称（冗余)
    String spu_id          ;

    //spu info
    String tm_id           ;
    String spu_name     ;
    String category3_id    ;

    //TM info
    String tm_name;
    //c3 info
    String category3_name;
    String category2_id;
    //c2 info
    String category2_name;
    String category1_id;
    //c1 info
    String category1_name;

    //Stats Field
    @Builder.Default
    Long click_cnt = 0L;
    @Builder.Default
    Long display_cnt = 0L;
    @Builder.Default
    Long favor_cnt = 0L;
    @Builder.Default
    Long add_cart_cnt = 0L;
    @Builder.Default
    Long order_cnt = 0L;
    @Builder.Default
    BigDecimal order_amount = BigDecimal.ZERO;
    @Builder.Default
    Long paid_cnt = 0L;
    @Builder.Default
    BigDecimal paid_amount = BigDecimal.ZERO;
    @Builder.Default
    Long refund_cnt = 0L;
    @Builder.Default
    BigDecimal refund_amount = BigDecimal.ZERO;
    @Builder.Default
    Long comment_cnt = 0L;
    @Builder.Default
    Long good_comment_cnt = 0L;

    //Get Order_cnt
    @TransientSink
    @Builder.Default
    Set orderSet = new HashSet<String>();
    @TransientSink
    @Builder.Default
    Set paidSet = new HashSet<String>();
    @TransientSink
    @Builder.Default
    Set refundSet = new HashSet<String>();

    Long ts;

}
